layui.use(['jquery', 'layer'], function () {
    var $ = layui.$; // 加载jQuery
    var layer = layui.layer; // 加载弹出层

    $.ajax({
        type: "post",
        url: "/admin/isLogin.do",
        async: false,
        dataType: "json",
        error: function () {
            layer.msg("ajax请求失败", {
                icon: 5
            });
        },
        success: function (response) {
            if (response != 1) {
                window.location.href = "/admin/login.html";
            }
        }
    });
});